package com.hqyj.crmdemo.mapper;

import com.hqyj.crmdemo.entity.Custmer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hqyj.crmdemo.entity.Report;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 何万林
 * @since 2022-10-17
 */
public interface CustmerMapper extends BaseMapper<Custmer> {

    //定义:统计等级
    @Select("select count(*) as count,region_name as item from custmer group by region_name")
    public abstract List<Report> countByLevel();
}
